import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.ww.bean.Car;
import org.ww.config.MainConfigBeanLifeCycle;

public class IOCTestBeanLifeCycle {
    @Test
    public void test01(){
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(MainConfigBeanLifeCycle.class);
//        applicationContext.getBean(Car.class);
        ((AnnotationConfigApplicationContext) applicationContext).close();
    }
}
